package com.bjpowernode.crm.settings.service.impl;

import com.bjpowernode.crm.settings.domain.DicType;
import com.bjpowernode.crm.settings.mapper.DicTypeMapper;
import com.bjpowernode.crm.settings.service.DicTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 郭俊才
 * 2021/8/20
 */
@Service
public class DicTypeServiceImpl implements DicTypeService {
    @Autowired
    private DicTypeMapper dicTypeMapper;
    @Override
    public int save(DicType record) {
        return dicTypeMapper.insert(record);
    }

    @Override
    public int removeByCodes(String[] codes) {

        return dicTypeMapper.deleteByCodes(codes);
    }

    @Override
    public int editByPrimaryKey(DicType dicType) {
        return dicTypeMapper.updateByPrimaryKey(dicType);
    }

    @Override
    public List<DicType> queryAll() {
        return dicTypeMapper.selectAll();
    }

    @Override
    public DicType queryByPrimaryKey(String code) {
        return dicTypeMapper.selectByPrimaryKey(code);
    }
}
